package text;

import RationalNumber.RationalNumber;

public class text{
	public static void main(String [] args) {
		RationalNumber a = new RationalNumber (2,8);
		RationalNumber b = new RationalNumber (1,4);
		System.out.println("a的值:"+a.doubleValue());
		System.out.println("a+b = "+a.add(b).toString());
		System.out.println("a-b = "+a.subtraction(b).toString());
		System.out.println("a/b = "+a.division(b).toString());
		System.out.println("a*b = "+a.multiply(b).toString());
		System.out.println("a和b是否相等："+a.equals(b));
		System.out.println("获取a的分子分母："+a.getNumberator()+"/"+a.getDenominator());
		
		RationalNumber c = new RationalNumber (1,0);//分母为0；
		System.out.println("c的值："+c.doubleValue());
	}
}